package com.laikan.reader.core.base;

import android.view.View;
import com.socks.library.KLog;

public abstract class BaseHolder<T> {

    public View view;
    public T mData;

    public BaseHolder() {
        KLog.i("new base holder");
        view = initView();
        view.setTag(this);
    }

    public abstract View initView();

    public abstract void refreshView();

    public T getData() {
        return mData;
    }

    public void setData(T data) {
        this.mData = data;
        refreshView();
    }


    public View getRootView() {
        return view;
    }

}
